Optimal. Leaf size=45 \[ \frac{b \log (a \cos (c+d x)+b \sin (c+d x))}{d \left (a^2+b^2\right )}+\frac{a x}{a^2+b^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.043348, antiderivative size = 45, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {3484, 3530} \[ \frac{b \log (a \cos (c+d x)+b \sin (c+d x))}{d \left (a^2+b^2\right )}+\frac{a x}{a^2+b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3484
Rule 3530
Rubi steps
\begin{align*} \int \frac{1}{a+b \tan (c+d x)} \, dx &=\frac{a x}{a^2+b^2}+\frac{b \int \frac{b-a \tan (c+d x)}{a+b \tan (c+d x)} \, dx}{a^2+b^2}\\ &=\frac{a x}{a^2+b^2}+\frac{b \log (a \cos (c+d x)+b \sin (c+d x))}{\left (a^2+b^2\right ) d}\\ \end{align*}
Mathematica [C] time = 0.0564538, size = 76, normalized size = 1.69 \[ \frac{(-b-i a) \log (-\tan (c+d x)+i)+i (a+i b) \log (\tan (c+d x)+i)+2 b \log (a+b \tan (c+d x))}{2 d \left (a^2+b^2\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.017, size = 74, normalized size = 1.6 \begin{align*} -{\frac{b\ln \left ( 1+ \left ( \tan \left ( dx+c \right ) \right ) ^{2} \right ) }{2\,d \left ({a}^{2}+{b}^{2} \right ) }}+{\frac{a\arctan \left ( \tan \left ( dx+c \right ) \right ) }{d \left ({a}^{2}+{b}^{2} \right ) }}+{\frac{b\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{d \left ({a}^{2}+{b}^{2} \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.64799, size = 93, normalized size = 2.07 \begin{align*} \frac{\frac{2 \,{\left (d x + c\right )} a}{a^{2} + b^{2}} + \frac{2 \, b \log \left (b \tan \left (d x + c\right ) + a\right )}{a^{2} + b^{2}} - \frac{b \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{2} + b^{2}}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.98028, size = 147, normalized size = 3.27 \begin{align*} \frac{2 \, a d x + b \log \left (\frac{b^{2} \tan \left (d x + c\right )^{2} + 2 \, a b \tan \left (d x + c\right ) + a^{2}}{\tan \left (d x + c\right )^{2} + 1}\right )}{2 \,{\left (a^{2} + b^{2}\right )} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 2.42587, size = 243, normalized size = 5.4 \begin{align*} \begin{cases} \frac{\tilde{\infty } x}{\tan{\left (c \right )}} & \text{for}\: a = 0 \wedge b = 0 \wedge d = 0 \\- \frac{i d x \tan{\left (c + d x \right )}}{- 2 b d \tan{\left (c + d x \right )} + 2 i b d} - \frac{d x}{- 2 b d \tan{\left (c + d x \right )} + 2 i b d} - \frac{i}{- 2 b d \tan{\left (c + d x \right )} + 2 i b d} & \text{for}\: a = - i b \\- \frac{i d x \tan{\left (c + d x \right )}}{2 b d \tan{\left (c + d x \right )} + 2 i b d} + \frac{d x}{2 b d \tan{\left (c + d x \right )} + 2 i b d} - \frac{i}{2 b d \tan{\left (c + d x \right )} + 2 i b d} & \text{for}\: a = i b \\\frac{x}{a + b \tan{\left (c \right )}} & \text{for}\: d = 0 \\\frac{x}{a} & \text{for}\: b = 0 \\\frac{2 a d x}{2 a^{2} d + 2 b^{2} d} + \frac{2 b \log{\left (\frac{a}{b} + \tan{\left (c + d x \right )} \right )}}{2 a^{2} d + 2 b^{2} d} - \frac{b \log{\left (\tan ^{2}{\left (c + d x \right )} + 1 \right )}}{2 a^{2} d + 2 b^{2} d} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.23145, size = 100, normalized size = 2.22 \begin{align*} \frac{\frac{2 \, b^{2} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{a^{2} b + b^{3}} + \frac{2 \,{\left (d x + c\right )} a}{a^{2} + b^{2}} - \frac{b \log \left (\tan \left (d x + c\right )^{2} + 1\right )}{a^{2} + b^{2}}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]